<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/admin/apps/edit" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
</head>

<body>
  <div class="page">
    <div class="page-hd">
      <h1>{$Think.Lang.appInfo}</h1>
    </div>

    <div class="form">
      <eq name="ACTION_NAME" value="preinstall">
        <form method="post" action="{:URL('admin/Apps/doInstall')}">
          <input type="hidden" name="path_name" value="{$path_name}" />
          <else />
          <form method="post" action="{:URL('admin/Apps/doEdit')}">
            <input type="hidden" name="app_id" value="{$app_id}" />
      </eq>
      <dl class="kv">
        <dt>{$Think.Lang.directoryName}：</dt>
        <dd>
          <input name="path_name" type="text" class="input-text" value="{$path_name}" disabled>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.appName}：</dt>
        <dd>
          <php>if(ACTION_NAME=='preinstall') {</php>
          <input name="app_name" type="text" class="input-text" value="{$app_name}" disabled>
          <p class="tip">{$Think.Lang.editAppNameCue_1}</p>
          <php>}else {</php>
          <input name="app_name" type="text" class="input-text" value="{$app_name}" id="app_name">
          <p class="tip">{$Think.Lang.editAppNameCue_2}</p>
          <php>}</php>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.appAlias}：</dt>
        <dd>
          <input name="app_alias" type="text" class="input-text" value="{$app_alias}">
          <p class="tip">{$Think.Lang.appAliasCue}</p>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.appIcon}：</dt>
        <dd>
          <input name="icon_url" type="text" class="input-text" value="{$icon_url}">
          <p class="tip">{$Think.Lang.appIconCue}</p>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.appBigIcon}：</dt>
        <dd>
          <input name="large_icon_url" type="text" class="input-text" value="{$large_icon_url}">

          <p class="tip">{$Think.Lang.appBigIconCue}</p>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.appType}：</dt>
        <dd>
          <input name="category" type="text" class="input-text" value="{$category}">
          <p class="tip">{$Think.Lang.appTypeCue}</p>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.appIntroduction}：</dt>
        <dd>
          <textarea rows="5" cols="50" name="description">{$description}</textarea>
          <p class="tip">{$Think.Lang.appIntroductionCue}</p>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.appStatus}：</dt>
        <dd>
          <php>$status = ($status=='0' || $status == '1')?$status:'2'</php>
          <label>
            <input name="status" type="radio" value="0" <eq name="status" value="0">checked</eq>>{$Think.Lang.close}</label>&nbsp;&nbsp;
          <label>
            <input name="status" type="radio" value="1" <eq name="status" value="1">checked</eq>>{$Think.Lang.default}</label>&nbsp;&nbsp;
          <label>
            <input name="status" type="radio" value="2" <eq name="status" value="2">checked</eq>>{$Think.Lang.optional}</label>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.trusteeship}：</dt>
        <dd>{$host_type_alias}</dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.frontEntrance}：</dt>
        <dd>
          <input name="app_entry" type="text" class="input-text" value="{$app_entry}">
          <p class="tip">{$Think.Lang.frontEntranceCue}</p>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.backstageEntrance}：</dt>
        <dd>
          <input name="admin_entry" type="text" class="input-text" value="{$admin_entry}">

          <p class="tip">{$Think.Lang.appName}</p>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.statisticsEntrance}：</dt>
        <dd>
          <input name="statistics_entry" type="text" class="input-text" value="{$statistics_entry}">
          <p class="tip">{$Think.Lang.statisticsEntranceCue}</p>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.additionalLinkName}：</dt>
        <dd>
          <input name="sidebar_title" type="text" class="input-text" value="{$sidebar_title}">

          <p class="tip">{$Think.Lang.additionalLinkNameCue}</p>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.additionalLinkIcon}：</dt>
        <dd>
          <input name="sidebar_icon_url" type="text" class="input-text" value="{$sidebar_icon_url}">
          <p class="tip">{$Think.Lang.additionalLinkIconCue}</p>
        </dd>
      </dl>

      <dl class="kv">
        <dt>{$Think.Lang.additionalLinkEntrance}：</dt>
        <dd>
          <input name="sidebar_entry" type="text" class="input-text" value="{$sidebar_entry}">
          <p class="tip">{$Think.Lang.additionalLinkEntranceCue}</p>
        </dd>
      </dl>

      <php>if($sidebar_support_submenu) {</php>
      <dl class="kv">
        <dt>{$Think.Lang.additionalLinkSubmenu}：</dt>
        <dd>
          <input name="sidebar_is_submenu_active" type="radio" value="0" <eq name="sidebar_is_submenu_active" value="0">checked</eq>
          >{$Think.Lang.disable}
          <br />
          <input name="sidebar_is_submenu_active" type="radio" value="1" <neq name="sidebar_is_submenu_active" value="0">checked</neq>
          >{$Think.Lang.enable}
          <p class="tip">{$Think.Lang.additionalLinkSubmenuCue}</p>
        </dd>
      </dl>
      <php>}</php>
      <php>if(!empty($homepage_url)){</php>
      <dl class="kv">
        <dt>{$Think.Lang.homepage}：</dt>
        <dd>
          <a href="{$homepage_url}" target="_blank">{$Think.Lang.homepage}</a>
        </dd>
      </dl>
      <php>}</php>

      <dl class="kv">
        <dt>{$Think.Lang.author}：</dt>
        <dd>{$author_name}</dd>

        <dd>
          <php>if(!empty($author_homepage_url)){</php>
          <a href="{$author_homepage_url}" target="_blank">{$Think.Lang.authorHomepage}</a>
          <php>}</php>
          <php>if(!empty($author_email)){</php>
          <a href="mailto:{$author_email}">Email</a>
          <php>}</php>

        </dd>
      </dl>
      <php>if(!empty($contributor_name)){</php>
      <dl class="kv">
        <dt>{$Think.Lang.contributor}：</dt>
        <dd>{$contributor_name}
          <dd>
            </dt>
      </dl>
      <php>}</php>

      <div class="actions">
        <php>if(ACTION_NAME=='preinstall'){</php>
        <input type="submit" class="btn btn-y" value="{$Think.Lang.install}" />
        <php>}else{</php>
        <input type="submit" class="btn btn-y" value="{$Think.lang.save}" />
        <php>}</php>
        <a href="javascript:history.go(-1);" class="btn btn-n">{$Think.lang.return}</a>
      </div>
      </form>
    </div>
  </div>
</body>

</html>
